#ifndef MYCLIPBOARD_H
#define MYCLIPBOARD_H

#include <QWidget>
#include "clipboardManager.h"
#include "clipboardStorage.h"
#include <QPushButton>
#include <QButtonGroup>

QT_BEGIN_NAMESPACE
namespace Ui { class MyClipBoard; }
QT_END_NAMESPACE

class MyClipBoard : public QWidget
{
    Q_OBJECT

public:
    MyClipBoard(QWidget *parent = nullptr);
    ~MyClipBoard();

private:
    Ui::MyClipBoard *ui;
    ClipboardManager *clipboardManager;
    void mousePressEvent(QMouseEvent* event)override;	//无边框窗口拖拽移动
    QPushButton *allButton;
    QPushButton *textButton;
    QPushButton *urlButton;
    QPushButton *fileButton;
    QPushButton *imageButton;
    QPushButton *favoriteButton;
    QButtonGroup* buttonGroup;

private slots:
    void updateListWidget(ClipboardType type, bool favorite, bool updatePosition);
    void addTextItem(const ClipboardItem& item);
    void addImageItem(const ClipboardItem& item);
    void addFileItem(const ClipboardItem& item);
    void addUrlItem(const ClipboardItem& item);
    void on_pushButton_clicked();
    void on_pushButton_2_clicked();
    void setAllStatus();
    void setTextStatus();
    void setUrlStatus();
    void setFileStatus();
    void setImageStatus();
    void setFavoriteStatus();
};

#endif // MYCLIPBOARD_H
